<div class="row-fluid">
    <div class="navbar no-margin">
        <div class="navbar-inner">
            <ul class="breadcrumb">
                <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar"
                        rel='tooltip'>&nbsp;</a></i>
                <li>
                    <a href="#/onduty">首页</a>
                </li>
                <li>
                    <a href="#/star/onduty/agent_list">监控列表</a>
                </li>
                <li class="active">监控管理</li>
            </ul>
        </div>
    </div>
</div>

<div class="container-fluid">

    <div class="row">
        <div class="col-sm-12 col-md-12 main">
            <div class="col-md-6 col-md-offset-3">
                <h2 style="text-align: center">(agent)详情信息</h2>
                <form name="form" novalidate>
                    <div class="form-group"
                        ng-class="{'has-error':form.agentId.$error.required,'has-success':!form.agentId.$error.required}">
                        <label style="padding: 0 0 5px">agentId</label>
                        <input ng-disabled="vm.isDisabled" type="text" class="form-control" name="agentId" ng-model="vm.p.agentId" required />
                        <span ng-show="form.agentId.$error.required" class="help-block">请输入agent_id</span>
                    </div>
                    <div class="form-group">
                        <label style="padding: 0 0 5px">agent秘钥</label>
                        <input type="text" class="form-control" name="agentSecret" ng-model="vm.p.agentSecret" />
                    </div>
                    <div class="form-group">
                        <label style="padding: 0 0 5px">agent名称</label>
                        <input type="text" class="form-control" name="agentName" ng-model="vm.p.agentName" />
                    </div>
<!--                    <div class="form-group"-->
<!--                        ng-class="{'has-error':form.resolvegroupId.$error.required,'has-success':!form.resolvegroupId.$error.required}">-->
<!--                        <label style="padding: 0 0 5px">支持组</label>-->
<!--                        <select required ng-model="vm.p.resolvegroupId"-->
<!--                            ng-options="x.resolvegroupId as x.name for x in vm.listResolveGroup" name="resolvegroupId"-->
<!--                            class="form-control">-->
<!--                        </select>-->
<!--                        <span ng-show="form.resolvegroupId.$error.required" class="help-block">请选择支持组</span>-->
<!--                    </div>-->
<!--                    <div class="form-group">-->
<!--                        <label style="padding: 0 0 5px">支持组id</label>-->
<!--                        <input readonly type="text" class="form-control" name="resolvegroupId" ng-model="vm.p.resolvegroupId"  />-->
<!--                        <span ng-show="form.app.$error.required" class="help-block" >未填写所属支持组!</span>-->
<!--                    </div>-->

                    <div class="form-group">
                        <label style="padding: 0 0 5px">部署地址</label>
                        <input type="text" class="form-control" name="hostname" ng-model="vm.p.hostname" />
                    </div>

                    <div class="form-group">
                        <label style="padding: 0 0 5px">使用场景</label>
                        <textarea class="form-control" style="height: 70px;" name="description" ng-model="vm.p.useInfo" ></textarea>
                    </div>

<!--                    <div class="form-group">-->
<!--                        <label style="padding: 0 0 5px">支持项（来自<a href="#/star/onduty/cti_list" target="_blank">支持项列表</a>）</label>-->
<!--                        <input id="ctiIds" type="text" class="form-control" data-role="tagsinput" name="ctiIds"-->
<!--                               ng-model="vm.p.ctiIds" required />-->
<!--                    </div>-->
                    <div class="form-group">
                        <label style="padding: 0 0 5px">负责人</label>
                        <input type="text" class="form-control" name="ownerId" ng-model="vm.p.ownerId" />
                    </div>

                    <div class="form-group" ng-class="{'has-error':form.status.$error.required,'has-success':!form.status.$error.required}">
                        <label style="padding: 0 0 5px">激活状态</label>
                        <select name="type" ng-model="vm.p.status" class="form-control" name="status" ng-init="vm.p.status='active'">
                            <option value="active">已激活</option>
                            <option value="inactive">未激活</option>
                        </select>
                        <span ng-show="form.status.$error.required" class="help-block">请选择激活状态!</span>
                    </div>
                    
                    <div class="form-group">
                        <input class="btn btn-primary" ng-class="{'disabled':!form.$valid}" type="button" value="确定"
                            ng-click="form.$valid&&addAgent()" />
                        <a href="#/star/onduty/agent_list" class="btn btn-default">返回</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<!--/.container-->
